package com.ejlchina.tool.util

import javax.crypto.Cipher
import javax.crypto.spec.SecretKeySpec

fun encryptECB(data: ByteArray,key: ByteArray): ByteArray{
    val cipher = Cipher.getInstance("AES/ECB/PKCS5Padding")
    cipher.init(Cipher.ENCRYPT_MODE,SecretKeySpec(key,"AES"))
    return cipher.doFinal(data)
}